Results 1 to 9 of 9

Thread: Flags , how do i attach them to the player ?

  1. #1
    Developer RyBack's Avatar
    Join Date
    Apr 2014
    Location
    In Front of the screen
    Posts
    1,567

    Default Flags , how do i attach them to the player ?

    so i made a trig (multiple)

    local.player = parm.other

    $flag.origin= local.player.origin


    the prop is it stick to the player when he is touching the trig , not always , Any ideas ?

  2. #2
    Developer RyBack's Avatar
    Join Date
    Apr 2014
    Location
    In Front of the screen
    Posts
    1,567

    Default

    up

  3. #3

    Default

    try this

    Code:
    local.player = parm.other
    
    local.obj = spawn script_origin
    local.obj.origin = local.player.origin
    local.obj glue local.player
    
    $flag.origin = local.obj.origin
    $flag bind local.obj

  4. #4
    Developer RyBack's Avatar
    Join Date
    Apr 2014
    Location
    In Front of the screen
    Posts
    1,567

    Default

    works , But i'm using a BEAM With a tileshader , the beam has an end point , the cmd "bind" f**ks it up , it looks like the longest beam ever !

  5. #5
    Developer Sor's Avatar
    Join Date
    Aug 2010
    Location
    The Medieval City of Bruges
    Posts
    747

    Default

    Define an offset for the end point relative to the beam's origin and set it every frame.

    Code:
    local.offset = ( 0 0 80 ); // always 80 units above the origin
    while(local.beam) 
    {
       local.beam endpoint (local.beam.origin + local.offset);
       waitframe;
    }
    Last edited by Sor; June 7th, 2015 at 06:15 AM.
    Morpheus Script (MoH) => You try to shoot yourself in the foot only to discover that MorpheusScript already shot your foot for you.

  6. #6
    Developer RyBack's Avatar
    Join Date
    Apr 2014
    Location
    In Front of the screen
    Posts
    1,567

    Default

    damn it , the script f**ked up again , i'll re-write it for the 3rd time XXXXDDD

  7. #7

    Default

    just stick it up someones arse

  8. #8
    Developer RyBack's Avatar
    Join Date
    Apr 2014
    Location
    In Front of the screen
    Posts
    1,567

    Default

    wise words , slim , wise words

  9. #9
    Developer RyBack's Avatar
    Join Date
    Apr 2014
    Location
    In Front of the screen
    Posts
    1,567

    Default

    Experience gained...

    from my experience , when u get mad , u fukin fix the script !


    PHP Code:
    main local.origin:
        
        
    level.home spawn script_origin
        level
    .home.origin local.origin
        level
    .home targetname "home"
        
    local.avatar spawn func_beam
        local
    .avatar.origin level.home.origin
        local
    .avatar.angles = ( -90 0 270 )
        
    local.avatar targetname "alliedflag"
        
    local.offset = ( 0 0 190 )
    //    while(1)
    //    {
        
    local.avatar endpoint ($alliedflag.origin local.offset)
    //    waitframe
    //    }
        
    local.avatar minoffset 1.0
        local
    .avatar maxoffset 1.0
        local
    .avatar color 0 0 1 )
        
    local.avatar scale 25
        local
    .avatar tileshader ("textures/hud/allies.tga")
        
    local.avatar numsegments 4
        local
    .avatar activate
        local
    .avatar thread fix_every_fuckin_thing
        thread trig_on
    end
    trig_on
    :
    local.trig spawn trigger_multiple
    local
    .trig.origin level.home.origin
    local
    .trig setsize ( -50 -50 -50 )( 50 50 50 )
    local.trig setthread attach_flag
    end
    attach_flag
    :
    local.player parm.other
    local
    .player stufftext "say testing..."
    local.sticky spawn script_origin
    local
    .sticky.origin local.player.origin
    local
    .sticky glue local.player
    while(1)
    {
    $alliedflag.origin local.sticky.origin
    waitframe
    }
    local.player stufftext "say done !"
    end
    fix_every_fuckin_thing
    :
    while(
    self)
    {
    self endpoint (self.origin + ( 0 0 190 ))
    waitframe
    }
    // thread fix_every_fuckin_thing
    end 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •